FROM registry.cn-shanghai.aliyuncs.com/nb-mkt/node:latest

WORKDIR /usr/src/app

COPY package*.json ./

COPY . ./

ADD ssh/ /root/.ssh

RUN echo "    IdentityFile ~/.ssh/id_rsa" >> /etc/ssh/ssh_config & \
echo "        StrictHostKeyChecking=no" >> /etc/ssh/ssh_config

# RUN chmod 400 /ssh/id_rsa

RUN npm install --registry=https://registry.npm.taobao.org

EXPOSE 3000

CMD npm run start
